package com.ruoyi.epidemic.web;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.epidemic.service.ITbCityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author zyc
 * @createDate 2023/3/22 19:09
 */
@RestController
@RequestMapping("/web/city")
public class CityController {
    @Autowired
    private ITbCityService cityService;

    //通过省份id获取省份下的城市
    @GetMapping("/list")
    public AjaxResult getCity(@RequestParam Long provinceId){
        return cityService.getCity(provinceId);
    }
}
